package com.lzy.wzy.model;

import com.lzy.wzy.constant.MyConstant;
import com.lzy.wzy.utils.PatternUtils;
import com.lzy.wzy.utils.PublicUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PreviewBean {

    private String templateStatus;

    private int idf;

    private String result;

    private boolean flag = false;

    public boolean getFlag() {
        return result.equals(MyConstant.TemplateStatus.IS_ENABLED);
    }

    public String getResult() {
        result = PublicUtils.getResult(templateStatus, idf);
        return result;
    }
}
